package com.xkcoding.helloworld.strategy;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component()
public class DiscountAServiceImpl implements DiscountService {

    private BigDecimal discountRate = new BigDecimal("0.9");

    @Override
    public String getDiscountResult(BigDecimal price) {
        //进行折扣相关业务处理
        return "执行折扣A优惠后金额："+price.multiply(discountRate);
    }




}
